package collection.listtest;

public class MyThread extends Thread{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }

    public static void main(String[] args) {
        MyThread thread1 = new MyThread();
        Thread thread = new Thread(thread1);
        thread.start(); //Thread-1
        MyThread thread11 = new MyThread();
        thread11.run(); //main
        System.out.println(Thread.currentThread().getName());
        System.out.println("运行结束!");
    }
}

